CREATE EXTERNAL TABLE jms_tmp.tmp_actual_history_network_tn_dt(
  taking_code string COMMENT '最早揽收网点', 
  taking_name string COMMENT '最早揽收网点name', 
  deliver_code string COMMENT '第一次派件网点', 
  deliver_name string COMMENT '第一次派件网点', 
  tn string COMMENT '签收时间-揽收时间=t+n', 
  all_bill int COMMENT '当前时段总单量', 
  start_hm string COMMENT '揽收时分开始', 
  end_hm string COMMENT '揽收时分结束 ', 
  hm_cnt int COMMENT '单量', 
  rt decimal(16,4) COMMENT '占比', 
  rk int COMMENT '排序')
COMMENT '实际数据历史时效'
PARTITIONED BY (dt string COMMENT '日期 分区时间')
STORED AS PARQUET
LOCATION '/dw/hive/jms_tmp.db/external/tmp_actual_history_network_tn_dt'
TBLPROPERTIES (
'discover.partitions'='false',
'parquet.column.index.access'='true'
);

CREATE EXTERNAL TABLE jms_tmp.tmp_cainiao_sign_standard(
  in_from_code string COMMENT '始发网点', 
  in_from_name string COMMENT '始发网点name', 
  out_to_code string COMMENT '签收', 
  out_to_name string COMMENT '规划应签收时间', 
  out_sign_days int COMMENT '时效数组')
COMMENT '菜鸟标准时效'
STORED AS PARQUET
LOCATION '/dw/hive/jms_tmp.db/external/tmp_cainiao_sign_standard'
TBLPROPERTIES (
'discover.partitions'='false',
'parquet.column.index.access'='true'
);


CREATE EXTERNAL TABLE jms_dm.dm_cainiao_actual_network_tn_dt(
  taking_code string COMMENT '最早揽收网点', 
  taking_name string COMMENT '最早揽收网点name', 
  deliver_code string COMMENT '第一次派件网点', 
  deliver_name string COMMENT '第一次派件网点', 
  start_hm string COMMENT '揽收时分开始', 
  end_hm string COMMENT '揽收时分结束 ', 
  days string COMMENT '取的标准时效', 
  date_time string COMMENT '查询日期', 
  rt decimal(16,4) COMMENT '占比')
COMMENT '网点时效，实际时效'
PARTITIONED BY ( 
  dt string COMMENT '日期 分区时间')
STORED AS PARQUET
LOCATION '/dw/hive/jms_dm.db/external/dm_cainiao_actual_network_tn_dt'
TBLPROPERTIES (
'discover.partitions'='false',
'parquet.column.index.access'='true'
);